package repo

import (
	"github.com/gin-gonic/gin"
	"mine-info-server/domain/plan-manage-context/model/plan-aggregate/aggregate"
	"mine-info-server/domain/plan-manage-context/model/plan-aggregate/entity"
)

type PlanManageIRepo interface {
	CreatePlan(*gin.Context, *aggregate.PlanAggregate) error
	DeleteTaskByPlanId(ctx *gin.Context, plan *aggregate.PlanAggregate) error
	DeleteTaskItemByPlanId(ctx *gin.Context, plan *aggregate.PlanAggregate) error
	DeletePlan(ctx *gin.Context, plan *aggregate.PlanAggregate) error
	FindPlanById(context *gin.Context, planId string) (*aggregate.PlanAggregate, error)
	FindCompletePlanById(context *gin.Context, planId string) (*aggregate.PlanAggregate, error)
	FindPlanContainsDetailById(context *gin.Context, planId string) (*aggregate.PlanAggregate, error)
	EditPlan(ctx *gin.Context, planAggregate *aggregate.PlanAggregate) error
	EditTarget(ctx *gin.Context, planAggregate *aggregate.PlanAggregate) error
	SubmitPlanReport(context *gin.Context, plan *aggregate.PlanAggregate) error
	FindPlanContainsReportById(context *gin.Context, planId string) (*aggregate.PlanAggregate, error)
	FindPlanContainsTaskByPlanIdAndDate(context *gin.Context, planId string, executeDate string) (*aggregate.PlanAggregate, error)
	FindParentPlanListPage(context *gin.Context, page int, pageSize int, userId string) ([]*aggregate.PlanAggregate, int64, error)
	GetTaskTotalByPlanId(planId string, finished bool) (int64, error)
	FindChildrenPlanListByParentId(parentId string, userID string) ([]*aggregate.PlanAggregate, error)
	CreateTask(context *gin.Context, plan *aggregate.PlanAggregate) error
	DeleteTaskItem(context *gin.Context, taskItemId string) error
	DeleteTask(context *gin.Context, taskId string) error
	GetTaskItemById(context *gin.Context, taskItemId string) (*aggregate.PlanAggregate, error)
	GetTaskList(context *gin.Context, planId string, page int, pageSize int) (*aggregate.PlanAggregate, int64, error)
	GetTaskById(context *gin.Context, taskId string) (*aggregate.PlanAggregate, error)
	FinishTaskItem(context *gin.Context, plan *aggregate.PlanAggregate) error
	FindOneDayQuestions(context *gin.Context, planId string, taskDate string) (*aggregate.PlanAggregate, error)
	SearchQuestions(context *gin.Context, planId string, content string) (*aggregate.PlanAggregate, error)
	IsFinishTask(context *gin.Context, planID string) (bool, error)
	GetOngoingTasksByPlanIds(context *gin.Context, planIds []string, scope string) ([]*entity.Task, error)
	FindOngoingPlanIds(userID string) ([]string, error)
	FindOngoingTaskItems(todoId string) ([]*entity.TaskItem, error)
	EditTaskItem(plan *aggregate.PlanAggregate) error
	BatchDeleteQuestions(deleteQuestions []*entity.Question) error
	SaveQuestions(plan *aggregate.PlanAggregate) error
	FinishPlan(plan *aggregate.PlanAggregate) error
	FindTaskByPlanIdAndDate(context *gin.Context, planId string, executeDate string) ([]*entity.Task, error)
	FindAllPlanByUserId(userId string) ([]*aggregate.PlanAggregate, error)
}
